<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/app.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css">
    <link href="../script/swiper/swiper.min.css" rel="stylesheet" />
    <style type="text/css">
    html,body{
        height: 100%;
    }
    
    .section_re{
    	 position: relative;
    }
    .section_ab{
    	 position: absolute;
    	 right:0;
    	 width:100px;
    	 background: #c3c3c3;
    	 text-align: center;
    }
   
    </style>
</head>
<body >
	<header class="H-header H-theme-background-color-white" id="header">
        <span id="back_btn" class="H-icon H-position-relative H-display-inline-block H-float-left H-vertical-middle H-theme-font-color-666 H-padding-horizontal-left-8 H-z-index-100">
        	<!--<i class="H-iconfont H-icon-target-back H-font-size-18 H-vertical-middle"></i>-->
        	<i class="H-iconfont icon-xiangzuo1 H-font-size-22 H-vertical-middle"></i>
        </span>
        <div  class=" header-title H-header-title   H-font-size-18 H-text-show-row-1 H-theme-font-color-333 H-position-absolute ">详情</div>
    	
    	<span onclick="qiehuan();" class=" section_re H-font-size-14 H-icon H-position-relative H-display-inline-block H-float-right H-vertical-middle H-theme-font-color-666 H-padding-horizontal-right-8 H-z-index-100">
    		不能播放？切换地址
    	</span>
    </header>
    
   
    
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="../script/app.js"></script>

<script type="text/javascript">
	
	var sysconfig = "";//获取系统配置参数 , 参数内容在后台接口获取
	
	var sid = "";
	var token = localStorage.getItem('token');
	var jx_video_url = localStorage.getItem('jx_video_url');
    apiready = function(){
    	sysconfig = $api.getStorage('sysconfig');
		api.parseTapmode();
		var title = api.pageParam.title;
		if( typeof title != 'undefined'  && title != '' && title != null ){
			$(".H-header-title").html(title);
		}
		
		sid = api.pageParam.sid;
		var header = $api.byId('header');
        $api.fixStatusBar(header); 
        var headerPos = $api.offset(header);
        var body_h = $api.offset($api.dom('body')).h;
		$app.bounces = false;
		//打开内容页面
		$app.openFrame(api.winName+"_body" , api.winName+"_body" , { 
			x: 0 , y: headerPos.h , w: headerPos.w , h: 'auto'
		});

		url = api.pageParam.url;
		
		
		api.addEventListener({
            name:'push_user_info'
        },function(ret,err){
        	token = localStorage.getItem('token');
        	jxlist();
        });
        
        jxlist();
		
		
		
    };
    
    
    function jxlist(){
    	if(token !='' && token!=null  && token!='undefined'){
    		$app.ajaxCache = false;
	    	$app.ajax($app.serverUrl+"index/index/jxlist",{ 'token' : token },'get',function(ret){
				if( ret.code ==1000){
					popupsArr = ret.result.data;
	    			popupsObj = ret.result.obj;
	    			
	    			jx_video_url = ret.result.data[0];
	    			localStorage.setItem('jx_video_url' , jx_video_url);
	    	
	//				qiehuan( ret.result);
				}
			});
    	}else {
    		popupsArr = [];
    		popupsObj = {};
    	}
    	
    }
    
    //店铺收藏
    function qiehuan( ){
    	
    
    	var header = $api.byId('header');
        $api.fixStatusBar(header); 
        var headerPos = $api.offset(header);
        
    	var mnPopups = api.require('MNPopups');
		mnPopups.open({
		    rect: {
		        w: 100,
		        h: 110
		    },
		    position: {
		        x: api.winWidth - 20,
		        y: headerPos.h-5
		    },
		    styles: {
		        mask: 'rgba(0,0,0,0.2)',
		        bg: '#eee',
		        cell: {
		            bg: {
		                normal: '',
		                highlight: ''
		            },
		            h: 35,
		            title: {
		                marginL: 35,
		                color: '#636363',
		                size: 12,
		            },
		            icon: {
		                marginL: 0,
		                w: 0,
		                h: 0,
		                corner: 0
		            },
		            separateLine: {              //（可选项）JSON 类型；分割线的样式设置
			            width: 0,                //（可选项）数字类型；分割线的粗细，默认为1
			            marginLR: 0,              //（可选项）数字类型；分割线距离左右的间距，默认为0
			            bg: '#C0C0C0'    ,        //（可选项）字符类型；分割线的背景颜色，支持rgb、rgba、#；默认：#C0C0C0 
			            hideLastSeparateLine: true //(可选项)布尔类型；是否隐藏最后一条分割线，默认false                    
			        }
		        },
		        pointer: {
		            size: 7,
		            xPercent: 90,
		            yPercent: 0,
		            orientation: 'downward'
		        }
		    },
		    datas: popupsObj,
		    animation: true
		}, function(ret) {
		    if (ret) {
		    	if( ret.eventType == "click"){
					jx_video_url = popupsArr[ret.index];
					localStorage.setItem('jx_video_url' , jx_video_url);
		    	}
		    }
		});
    }
    
    
    
    function complaints(){
    	token = localStorage.getItem('token');
    	if(typeof token =='undefined'  ||  token =='' || token == null ){
    		$app.openWinByUrl('login' , 'login');
    		return false;
    	}
    	
    	$app.openWinByUrl('complaints_win_head' , 'win_head' , {'id':api.pageParam.id, 'frame':'complaints_body' , 'furl':'complaints_body' , 'title':'投诉举报'});
    }
    

	
</script>
</html>